Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: improve error handling and output #2164

Merged
merged 6 commits into from
Dec 17, 2024

Conversation

gudmdharalds
Copy link
Contributor

@gudmdharalds gudmdharalds commented Dec 16, 2024

Description

Improves error handling and output in a few places:

  • Change error strings so they can be distinguished between instances.
  • Add error detail by extracting information from error object.

Pull request checklist

New release checklist

Steps to Test

  1. Checkout the PR locally.
  2. Run npm run build.
  3. Add vip-cli/dist/bin from repository to PATH.
  4. Run vip-wp.js -y @MYAPP -- user list - observe normal output.
  5. Run vip-app.js MYAPP - observe normal output.
  6. Change API path (api.wpvip.com) in src/lib/api.ts to api2.wpvip.com.
  7. Re-run all steps from 2 above and observe error in output.

@gudmdharalds gudmdharalds added the [Type] Enhancement New feature or request label Dec 16, 2024
@gudmdharalds gudmdharalds self-assigned this Dec 16, 2024
Copy link
Contributor

github-actions bot commented Dec 16, 2024

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Files

@gudmdharalds gudmdharalds requested a review from a team December 16, 2024 17:53
Copy link
Contributor

@robersongomes robersongomes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I only left a minor suggestion that can be safely ignored.

src/lib/utils.ts Outdated Show resolved Hide resolved
src/bin/vip-app.js Outdated Show resolved Hide resolved
@sjinks sjinks changed the title fix(Improve error handling and output) fix: improve error handling and output Dec 17, 2024
@gudmdharalds gudmdharalds merged commit 89b4089 into trunk Dec 17, 2024
17 checks passed
@gudmdharalds gudmdharalds deleted the fix/improve-error-logging-2024 branch December 17, 2024 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants